<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Example11</title>
</head>
<body>
  <button id="btn">点我一下</button>
  <script>
    // 获取按钮元素
    var btn = document.getElementById('btn');
    btn.onclick = function () {
      // 将获取到的按钮元素中文本的字号设置为30px
      btn.style.fontSize = '30px';
    };
  </script>
</body>
<html>